package com.ruoyi.sl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlVacationMapper;
import com.ruoyi.sl.domain.SlVacation;
import com.ruoyi.sl.service.ISlVacationService;

/**
 * 假期基础系数Service业务层处理
 * 
 * @author admin
 * @date 2024-06-03
 */
@Service
public class SlVacationServiceImpl implements ISlVacationService 
{
    @Autowired
    private SlVacationMapper slVacationMapper;

    /**
     * 查询假期基础系数
     * 
     * @param vacationId 假期基础系数主键
     * @return 假期基础系数
     */
    @Override
    public SlVacation selectSlVacationByVacationId(Long vacationId)
    {
        return slVacationMapper.selectSlVacationByVacationId(vacationId);
    }

    /**
     * 查询假期基础系数列表
     * 
     * @param slVacation 假期基础系数
     * @return 假期基础系数
     */
    @Override
    public List<SlVacation> selectSlVacationList(SlVacation slVacation)
    {
        return slVacationMapper.selectSlVacationList(slVacation);
    }

    /**
     * 查询所有假期基础系数列表
     *
     * @return 假期基础系数集合
     */
    @Override
    public List<SlVacation> selectVacationAll(){
        return slVacationMapper.selectVacationAll();
    }

    /**
     * 新增假期基础系数
     * 
     * @param slVacation 假期基础系数
     * @return 结果
     */
    @Override
    public int insertSlVacation(SlVacation slVacation)
    {
        slVacation.setCreateTime(DateUtils.getNowDate());
        return slVacationMapper.insertSlVacation(slVacation);
    }

    /**
     * 修改假期基础系数
     * 
     * @param slVacation 假期基础系数
     * @return 结果
     */
    @Override
    public int updateSlVacation(SlVacation slVacation)
    {
        slVacation.setUpdateTime(DateUtils.getNowDate());
        return slVacationMapper.updateSlVacation(slVacation);
    }

    /**
     * 批量删除假期基础系数
     * 
     * @param vacationIds 需要删除的假期基础系数主键
     * @return 结果
     */
    @Override
    public int deleteSlVacationByVacationIds(Long[] vacationIds)
    {
        return slVacationMapper.deleteSlVacationByVacationIds(vacationIds);
    }

    /**
     * 删除假期基础系数信息
     * 
     * @param vacationId 假期基础系数主键
     * @return 结果
     */
    @Override
    public int deleteSlVacationByVacationId(Long vacationId)
    {
        return slVacationMapper.deleteSlVacationByVacationId(vacationId);
    }
}
